package com.ruoyi.iot.service.impl;

import com.ruoyi.iot.domain.entity.DeviceElectricalWindow;
import com.ruoyi.iot.domain.query.DeviceElectricalWindowQuery;
import com.ruoyi.iot.mapper.DeviceElectricalWindowMapper;
import com.ruoyi.iot.service.DeviceElectricalWindowService;
import java.util.List;
import org.springframework.stereotype.Service;

/**
 * 设备电气窗口服务实现
 */
@Service
public class DeviceElectricalWindowServiceImpl implements DeviceElectricalWindowService {

    private final DeviceElectricalWindowMapper deviceElectricalWindowMapper;

    public DeviceElectricalWindowServiceImpl(DeviceElectricalWindowMapper deviceElectricalWindowMapper) {
        this.deviceElectricalWindowMapper = deviceElectricalWindowMapper;
    }

    /**
     * 查询设备电气窗口列表
     *
     * @param query 查询条件
     * @return 电气窗口列表
     */
    @Override
    public List<DeviceElectricalWindow> list(DeviceElectricalWindowQuery query) {
        DeviceElectricalWindowQuery safeQuery = query == null ? new DeviceElectricalWindowQuery() : query;
        return deviceElectricalWindowMapper.selectList(safeQuery);
    }
}
